<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>百度导航</title>
    <style>
        /* ----------公共样式----------- */
        body {
            margin: 0;
        }

        ul,
        ol {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        a {
            text-decoration: none;
        }

        .clearfix::after {
            content: '';
            display: block;
            clear: both;
        }

        /* ------------头部样式----------- */
        header {
            height: 40px;
            background-color: rgb(1, 32, 79);
        }

        .nav {
            width: 984px;
            margin: 0 auto;
            /* background-color: rgb(231, 196, 196); */
        }

        .nav li {
            float: left;
            
        }

        .nav li:first-child {
            background-color: #cc0000;
        }

        .nav li:hover {
            background-color: #cc0000;
        }

        .nav li a {
            line-height: 40px;
            color: white;
            font-weight: bold;
            /* background-color: rgb(177, 243, 160); */
            display: block;
            padding-left: 10px;
            padding-right: 10px;
        }
        .box{
            width: 100px;
            height: 100px;
            background-color: rgb(169, 233, 156);
            float: left;
            margin-right: 10px;
        }
        /* ---------------主体内容------------ */
        /* 第一文章 */
        /* width: 984px; */
    </style>
</head>

<body>
    <header>
        <ul class="nav clearfix">
            <li>
                <a href="">首页</a>
            </li>
            <li>
                <a href="">国内</a>
            </li>
            <li>
                <a href="">国际</a>
            </li>
            <li>
                <a href="">军事</a>
            </li>
            <li>
                <a href="">财经</a>
            </li>

        </ul>
    </header>
    <div class="container">
        <div class="box"></div>
        <div class="box"></div>
        <div class="box"></div>
    </div>
</body>

</html>